<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> 
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> 
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>

<table width="85%" border="0" cellpadding="5" cellspacing="1" bgcolor="#3399CC" class="text">
<html:form action="/dbconfig">
<tr bgcolor="#FFFFFF">
<td>Connector Name</td><td>
		<html:text property="name" styleClass="text" maxlength="30"/>				
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td>Type</td><td>
<html:select property="type" onchange="changePort();">
	<html:option value="postgres">PostgreSQL</html:option>
	<html:option value="oracle">Oracle</html:option>
</html:select>
</td>
</tr>


<tr bgcolor="#FFFFFF">
<td>User</td><td>
	<html:text property="user" styleClass="text" maxlength="30"/>				
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td>Password</td><td>
		<html:password property="password" styleClass="text" maxlength="30"/>				
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td>Host</td><td>
		<html:text property="host" styleClass="text" maxlength="30"/>				
</td>
</tr>

<tr bgcolor="#FFFFFF">
<td>Port</td><td>
		<html:text property="port" styleClass="text" maxlength="30"/>				
</td>
</tr>

<tr bgcolor="#FFFFFF">
<td>Database/Tablespace</td><td>
		<html:text property="db" styleClass="text" maxlength="30"/>				
</td>
</tr>

<tr bgcolor="#FFFFFF" align="center">
<td colspan="2">
<html:submit property="save">
Save
</html:submit>
</td>
</tr>



<script name="javascript">
	function changePort() {
	if(document.editDBConnectorForm.type.value=='postgres') document.editDBConnectorForm.port.value='5432';
	if(document.editDBConnectorForm.type.value=='oracle') document.editDBConnectorForm.port.value='1501';
	};
</script>

</html:form>
</table>